﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using YasharEl.Infrastructure.EntityModel;

namespace YasharEl.Infrastructure.Core.Prototype
{
    [Serializable]
    public class ParameterRequirement : Enumeration
    {
        #region TypeSafe Static Enumarations

        public static readonly ParameterRequirement NotRequired = new NotRequiredParameterRequirement();
        public static readonly ParameterRequirement RequiredForStart = new RequiredForStartParameterRequirement();
        public static readonly ParameterRequirement RequiredForRun = new RequiredForRunParameterRequirement();

        #endregion

        #region Constructors

        protected ParameterRequirement(int value, string shortName, string longName)
            : base(value, shortName, longName)
        {
        }

        protected ParameterRequirement()
        {
        }

        #endregion

        #region Inner Classes - Type safe concrete enumarations.

        [Serializable]
        private class NotRequiredParameterRequirement : ParameterRequirement
        {
            public NotRequiredParameterRequirement()
                : base(0, "NotRequired", "Parameter not required")
            {

            }
        }

        [Serializable]
        private class RequiredForStartParameterRequirement : ParameterRequirement
        {
            public RequiredForStartParameterRequirement()
                : base(1, "RequiredForStart", "Parameter required for start")
            {

            }
        }

        [Serializable]
        private class RequiredForRunParameterRequirement : ParameterRequirement
        {
            public RequiredForRunParameterRequirement()
                : base(2, "RequiredForRun", "Parameter required for run")
            {

            }
        }

        #endregion
    }
}
